package com.deep.seckill.fallback;

import com.deep.common.model.enume.BizCodeEnum;
import com.deep.common.utils.R;
import com.deep.seckill.feign.ProductFeignService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * 商品服务远程熔断回调处理器
 *
 * @author Deep
 * @date 2022/3/1
 */
@Slf4j
@Component
public class ProductFeignServiceFallback implements ProductFeignService {
    @Override
    public R getSkuInfo(Long skuId) {
//        log.info("熔断调用......");
        return R.error(BizCodeEnum.TOO_MANY_REQUEST.getCode(), BizCodeEnum.TOO_MANY_REQUEST.getMsg());
    }
}
